filtering on/off - how to apply to non-current module?

Hi guys,

I am running a script, not from a module, but instead from the top level.

My script opens two modules. I want to turn filerting off on both of them before procedding.

I have used "filtering off/on" before but that only applies to the current module right? What if I have no current module?

is there anything like filerting("Module Name", "false") to explicity specify the module where filtering should be turned off?

Cheers
gpolley - Wed Sep 30 06:59:46 EDT 2009

Re: filtering on/off - how to apply to non-current module?
llandale - Wed Sep 30 09:59:13 EDT 2009

Lets not confuse 'current' with 'original' module. Usually when you open a module it becomes 'current'.

There are other commands that presume the 'current' module, mostly dealing with attributes. These commands should routinely be surrounded as follows:

Module mCurr = current()
current = mod   // Module I want to presume to be current
filtering off   // or other presumptive commands
if (!null mCurr) current = mCurr  // Reset the 'current'


You cannot set the current module to null, thus the 'if (!null mCurr)' command. Note that if there was actually no 'current' module, there will be after the above code; I have yet to find a case where that matters.

If you are having trouble with these presumptive commands you should insert some sort of
print "Current module = " name(current Module) "\n" before such commands.

 

 

  • Louie